import { GCellRenderer } from "../../../../../com/mui/controls/GCellRenderer";
import { DisplayUtil } from "../../../../common/DisplayUtil";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { FilterConst } from "../../../../component/gconst/FilterConst";
//class FaceMcRender
    
    export  class FaceMcRender extends GCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            this._className = arg1.data as string;
            DisplayUtil.removeMe(this._mc);
            this._mc = GlobalClass.getInstance(this._className) as Object /* flash.display.MovieClip */;
            this._mc.mouseEnabled = true;
            this._mc.buttonMode = true;
            this.addChild(this._mc);
            this._mc.addEventListener(flash.events.MouseEvent.MOUSE_OVER, this.selectHandler);
            this._mc.addEventListener(flash.events.MouseEvent.MOUSE_OUT, this.selectHandler);
            return;
        }

        /* internal  */selectHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            var loc1=arg1.target as Object /* flash.display.MovieClip */;
            if (arg1.type == flash.events.MouseEvent.MOUSE_OVER) 
            {
                loc1.filters = [FilterConst.itemChooseFilter];
            }
            if (arg1.type == flash.events.MouseEvent.MOUSE_OUT) 
            {
                loc1.filters = [];
            }
            return;
        }

        /* internal */ /* var */_mc: Object /* flash.display.MovieClip */;

        /* internal */ /* var */_className: string;
    }
